﻿using System;
using System.Collections.Generic;
using System.Data.Linq;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel.Activation;
using System.Text;
using System.Data.Sql;
using System.Data.SqlClient;
using Dzzzr;

namespace MonitoringService
{
  // NOTE: If you change the class name "Monitoring" here, you must also update the reference to "Monitoring" in Web.config.
  [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
  public class Monitoring //: IMonitoring
  {
    public User GetUser(string login, string password)
    {
      //MonitoringDataContext dataContext = new MonitoringDataContext();
      //List<User> users = dataContext.GetUserByLoginPassword(login, password).ToList();
      //if (users.Count == 1)
      //  return users[0];
      //else
        return null;
    }


    //public List<Game> GetGameList(string login, string password)
    //{
    //  MonitoringDataContext dataContext = new MonitoringDataContext();
    //  List<Game> games = dataContext.GetGameList(login, password).ToList();
    //  return games;
    //}

    //public byte[] GetEntityPhoto(string login, string password, int entityID)
    //{
    //  MonitoringDataContext dataContext = new MonitoringDataContext();
    //  ISingleResult<GetEntityPhotoResult> result = dataContext.GetEntityPhoto(login, password, entityID);
    //  byte[] image = new byte[0];
    //  if(result.Count() > 0)
    //    image = result.Single().Photo.ToArray();
    //  return image;
    //}


    //public List<Entity> GetGameEntities(string login, string password, int gameID)
    //{
    //  MonitoringDataContext dataContext = new MonitoringDataContext();
    //  List<Entity> entities = dataContext.GetRootGameEntityList(login, password, gameID).ToList();
    //  return entities;
    //}

    //public List<Marker> GetMarkerList(string login, string password, int gameID)
    //{
    //  MonitoringDataContext dataContext = new MonitoringDataContext();
    //  List<Marker> entities = dataContext.GetGPSPointByGameID(login, password, gameID).ToList();
    //  return entities;
    //}

  }
}
